<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <!-- react容器 -->
    <div id="test"></div>

    <!-- 引入react核心库 -->
    <script src="../lib/react.js"></script>
    <!-- 引入react-dom -->
    <script src="../lib/react-dom.js"></script>
    <!-- 引入babel -->
    <script src="../lib/babel.min.js"></script>
    <script type="text/babel">
      //1 创建类式组件
      class Mycompnents extends React.Component {
        render() {
          console.log(this);
          return <h1>hello class component</h1>;
        }
      }
      ReactDOM.render(<Mycompnents />, document.getElementById("test"));
    </script>
  </body>
</html>
